package hust.hiepdv.javaproject.view;

import hust.hiepdv.javaproject.model.Ball;
import hust.hiepdv.javaproject.model.Pad;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class StartGameFrame extends JFrame implements Runnable{
	
	public static final int WIDTH = 615;
	public static final int HEIGHT = 640;
	protected DrawPanel drawPanel;
	
	
	public StartGameFrame(String title){
		super(title);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setSize(WIDTH, HEIGHT);
		this.setResizable(false);
		
		drawPanel = new DrawPanel();
		this.getContentPane().add(drawPanel);		
	}

	@Override
	public void run() {
		StartGameFrame startFrame = new StartGameFrame("Bouncing Ball");
		startFrame.setVisible(true);
		startFrame.drawPanel.startGame();
	}		
}
